package com.gang.mars.redisson.Thread;

public class Apple07Join implements Runnable{

    public static void main(String[] args) throws InterruptedException {

        Apple07Join join = new Apple07Join();
        Thread thread = new Thread(join);
        thread.start();

        for (int i = 0; i < 100; i++) {
            if (i == 50) {
                thread.join();
            }

            System.out.println("thread main start " + i);
        }
    }

    @Override
    public void run() {
        for (int i = 0; i < 200; i++) {
            System.out.println("thread vip is coming " + i);
        }
    }
}
